/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.gap.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Mrs Yun KZ
 */
@Entity
@Table(name = "gap_master_oultet")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "GapMasterOultet.findAll", query = "SELECT g FROM GapMasterOultet g"),
    @NamedQuery(name = "GapMasterOultet.findByOultetId", query = "SELECT g FROM GapMasterOultet g WHERE g.oultetId = :oultetId"),
    @NamedQuery(name = "GapMasterOultet.findByOultetName", query = "SELECT g FROM GapMasterOultet g WHERE g.oultetName = :oultetName")})
public class GapMasterOultet implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "oultet_id")
    private String oultetId;
    @Column(name = "oultet_name")
    private String oultetName;


    public GapMasterOultet() {
    }

    public GapMasterOultet(String oultetId) {
        this.oultetId = oultetId;
    }

    public String getOultetId() {
        return oultetId;
    }

    public void setOultetId(String oultetId) {
        this.oultetId = oultetId;
    }

    public String getOultetName() {
        return oultetName;
    }

    public void setOultetName(String oultetName) {
        this.oultetName = oultetName;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (oultetId != null ? oultetId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GapMasterOultet)) {
            return false;
        }
        GapMasterOultet other = (GapMasterOultet) object;
        if ((this.oultetId == null && other.oultetId != null) || (this.oultetId != null && !this.oultetId.equals(other.oultetId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return oultetName;
//        return "com.gap.entities.GapMasterOultet[ oultetId=" + oultetId + " ]";
    }
    
}
